[QEMU] pci: Unaligned config read/write overflow
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 28 Nov 2006 13:46:10 +0000 (13:46 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 28 Nov 2006 13:46:10 +0000 (13:46 +0000)
commit2b87d5adbbe9df8fe4756da4f40a84504b6acf2e
tree875f2a3350a1e1f0dea191b2a10ec93af9ee4ed9
parent6c06dcdb867f9e0edc942b03ceaf6510a97a2e0a
[QEMU] pci: Unaligned config read/write overflow

The default config read/write handlers allows a 4-byte read/write at
address 255.  This can clobber the field after the config area.  This
happens to be the PCIBus pointer in the PCIDevice structure.

This patch stops this from reducing the read/write to the (largest
multiple of 2) number of bytes within the config area.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
tools/ioemu/hw/pci.c